package handlers

import (
	"GoServer/net/ws"
	"github.com/gin-gonic/gin"
)

func RouterForLive(engine *gin.Engine, address, gameName string) {
	router := engine.Group("/live")
	router.GET("/websocket", func(c *gin.Context) {
		ws.OnMessage(c.Writer, c.Request)
	})

	// / 获取直播房间id [post]
	router.POST("/liveInfo", RequestLiveRoomID)

	/// 更新游戏排行榜
	router.POST("/updateRank", SyncRankData)
	router.GET("/getPlayerRankNumber", GetPlayerRankNumber)

	router.POST("/uploadGameData", UploadGameUserInfo)
	router.POST("/completeUploadUserResult", CompleteUploadUserResult)
	router.POST("/syncRankData", SyncUserBasicRank)

	/// 上报用户阵营数据
	router.POST("/upload_user_group_info", UploadUserGroupInfo)

	/// 抖音推送协议
	router.POST("/comment", OnLiveComment) /// 评论数据
	router.POST("/gift", OnLiveGift)       /// 礼物数据
	router.POST("/like", OnLiveLike)       /// 点赞数据

	/// 快手推送协议
	router.POST("/ks/live_message", OnKSLiveWarapper)
}
